package com.buss.base.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.buss.core.dic.BussinessBillNoType;

/**
 * 业务单据号
 * @author gykl
 *
 */
@Entity
@Table(name = "base_bussbillNo")
@TableGenerator(name="bussbillNo_pk_sequence",initialValue=1,allocationSize=1,pkColumnName="seq_col",
pkColumnValue="bussbillNo_seq",valueColumnName="seq_val",table="base_pk_sequence")
public class BussinessBillNo implements Serializable{

	private static final long serialVersionUID = 8300392069109867207L;

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator="bussbillNo_pk_sequence")
	private Long id;
	
	/**单位编码*/
	@Column(length=20,nullable=false)
	private String companyId;
	
	/**业务类型*/
	@Column(length=20,nullable=false)
	@Enumerated(value=EnumType.STRING)
	private BussinessBillNoType billType;
	
	/**订单值*/
	@Column(nullable=false)
	private Long val;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public Long getVal() {
		return val;
	}

	public void setVal(Long val) {
		this.val = val;
	}

	public BussinessBillNoType getBillType() {
		return billType;
	}

	public void setBillType(BussinessBillNoType billType) {
		this.billType = billType;
	}
	
	
	
}
